package com.itlong.cloud.operate.service;

import com.itlong.cloud.POJO.DTO.operate.OperateShareProfitRuleDTO;
import com.itlong.cloud.POJO.VO.operate.OperateShareProfitRuleGetVO;
import com.itlong.cloud.utils.page.Page;

/**
 * <desc>
 *      分润规则信息管理服务层接口
 * </desc>
 *
 * @createDate 2019/05/20
 */
public interface IOperateShareProfitRuleService {

    /**
     * <desc>
     *      分页获取分润规则信息
     * </desc>
     *
     * @param operateShareProfitRuleDTO 分润规则信息DTO
     * @return 分润规则信息列表
     * @author wangzhi
     * @createDate 2019/05/20
     */
    Page<OperateShareProfitRuleGetVO> getPage(OperateShareProfitRuleDTO operateShareProfitRuleDTO) throws Exception;


    /**
     * <desc>
     *      添加分润规则信息
     * </desc>
     *
     * @param operateShareProfitRuleDTO 分润规则信息DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2019/05/20
     */
    Integer save(OperateShareProfitRuleDTO operateShareProfitRuleDTO) throws Exception;

    /**
     * <desc>
     *      查询单个分润规则
     * </desc>
     *
     * @param operateShareProfitRuleDTO 分润规则信息DTO
     * @return 分润规则
     * @author wangzhi
     * @createDate 2019/05/20
     */
    OperateShareProfitRuleGetVO getOne(OperateShareProfitRuleDTO operateShareProfitRuleDTO) throws Exception;

    /**
     * <desc>
     *      修改分润规则信息
     * </desc>
     *
     * @param operateShareProfitRuleDTO 分润规则信息DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2019/05/20
     */
    Integer update(OperateShareProfitRuleDTO operateShareProfitRuleDTO) throws Exception;

    /**
     * <desc>
     *      删除分润规则信息，可批量
     * </desc>
     *
     * @param ruleIds 分润规则信息id，多个英文逗号相连
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2019/05/20
     */
    Integer delete(String ruleIds) throws Exception;

    /**
     * <desc>
     *      校验分润规则是否闲置
     * </desc>
     *
     * @param ruleIds 分润规则信息id，多个英文逗号相连
     * @return true-是，false-否
     * @author wangzhi
     * @createDate 2019/05/20
     */
    boolean checkRuleIdle(String ruleIds) throws Exception;
}
